<template>
  <v-container>
    <v-row>
      <v-col>
        <v-card>
          <v-card-text>
            <v-alert outlined type="warning" prominent border="left">
              简单的一个人物装扮系统的设计与实现。
            </v-alert>
          </v-card-text>
        </v-card>
      </v-col>
    </v-row>
    <v-row>
      <v-col>
        <v-card>
          <v-card-text class="mt-2">
            <v-row>
              <v-col v-for="(d, index) in detactor" :key="index" cols="12">
                【第{{ index + 1 }}种】 {{ d }}
              </v-col>
            </v-row>
          </v-card-text>
        </v-card>
      </v-col>
    </v-row>
  </v-container>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import {
  BigTrouser,
  LeatherShoes,
  PersonV2,
  Shirts,
  Sneakers,
  Suit,
  Tie
} from "@/design-pattern/06-decorator/PersonV2";

@Component({})
export default class PageV2 extends Vue {
  // region Prop
  // endregion
  // region Data
  detactor: string[] = [];
  // endregion
  // region computed
  // endregion
  // region watch
  // endregion
  // region method
  // endregion
  // region hook
  created() {
    const person = new PersonV2("张三");

    person.Wear(new BigTrouser());
    person.Wear(new LeatherShoes());
    person.Wear(new Shirts());
    this.detactor.push(person.Show());

    person.Wear(new Tie());
    person.Wear(new Sneakers());
    person.Wear(new Suit());
    this.detactor.push(person.Show());
  }
  // endregion
}
</script>

<style lang="scss"></style>
